// 公用过滤 图片的方法
export const imgFilter = (type, num) => {
  let number
  if (!type) {
    return false
  }
  // else {
  //   let index = type.lastIndexOf('#')
  //   type = type.substring(index + 1, type.length)
  // }
  if (typeof num === 'number' && !isNaN(num)) {
    switch (num) {
      case 0:
        number = 2
        break
      case 1:
        number = 1
        break
      case 2:
        number = 3
        break
      default:
        break
    }
  } else {
    number = 3
  }
  let imgName = {
    '1001': 'centrifuge' + number,
    '1002': 'screw' + number,
    '1003': 'compressor' + number,
    '1004': 'tower' + number,
    '1005': 'pump' + number,
    '1006': 'pump' + number,
    '1007': 'tanks' + number,
    '1008': 'dryer' + number,
    '1009': 'cooling' + number
  }
  return imgName[type]
}
// hash 必备图片
export const imgHash = {
  '1001': 'centrifuge',
  '1010': 'control',
  '1009': 'cooling',
  '1011': 'drying',
  '1003': 'drying',
  '1012': 'meter',
  '1002': 'screw',
  '1013': 'thermometer',
  '1004': 'tower',
  '1005': 'pump',
  '1006': 'pump',
  '1007': 'tanks',
  '1008': 'dryer'
}
